#include <stdio.h>

int main( )
{
    int a[ 1001 ], i, j, n, m;
    double b[ 1001 ], max, f[ 10001 ];
    while ( scanf("%d%d", &n, &m) != EOF )
    {
        if ( n == 0 && m == 0 ) break;
        max = 1;
        for ( i = 0; i <= n; i++ )
            f[ i ] = 1;
        for ( i = 0; i < m; i++ )
            scanf("%d%lf", &a[ i ], &b[ i ]);
        for ( i = 0; i < m; i++ )
            for ( j = n; j >= a[ i ]; j-- )
            {
                if ( f[ j - a[ i ] ] != 1 )
                {
                    if ( f[ j - a[ i ] ] * ( 1 - b[ i ] ) < f[ j ] )
                        f[ j ] = f[ j - a[ i ] ] * ( 1.0 - b[ i ] );
                }
                if ( j == a[ i ] )
                    f[ a[ i ] ] = 1 - b[ i ];
            }
        for ( i = 0; i <= n; i++ )
            if ( max > f[ i ] ) max = f[ i ];
        max = ( 1 - max ) * 100;
        printf("%.1lf%%\n", max);
    }
    return 0;
}
